package com.java65;

import java.util.Scanner;

public class ForDome2 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入学员名字:");
        String name = input.next();
        float score=0.0f;
        float total=0.0f;
        float avg=0.0f;
        float max=0.0f;
        float min=0.0f;
        //next()和next
        for(int i=1;i<=5;i++){
            System.out.println("请输入"+name+"的第"+i+"门课程的成绩:");
            score=input.nextFloat();
            total +=score;
            if(i==1){
            }
            if(score<min){
                score=min;
            }
            if(score>max){
                score=max;
            }
            avg=total/5;
            System.out.println(name + "的总成绩为：" + total + ",平均分为：" + avg + ",最高分为：" + max + ",最低分为：" + min);
        }
    }
}
